Converting Disk Images into Bootable VMs
Prerequisitesβ
Before starting, ensure you have the following:
- Raw Disk Image: The source file you want to convert (e.g.,
system.img). - VMware Workstation: Installed on your MIP.
qemu-imgUtility: This tool is part of the QEMU virtualization package.
Procedureβ
The process involves two main stages: converting the image file format and then creating a new VMware VM that uses the converted file.
Step 1: Convert the Raw Image to VMDKβ
This step is identical regardless of the virtualization software.
-
Open your command-line interface (Command Prompt or PowerShell as Administrator on Windows, or Terminal on Linux/macOS).
-
Execute the
qemu-imgconversion command. The basic syntax is:qemu-img convert -f raw -O vmdk <source_image_file> <destination_vmdk_file>-f raw: Specifies the format of the input file is raw.-O vmdk: Specifies the desired output format is VMDK, compatible with VMware.
Example:
qemu-img convert -f raw -O vmdk "C:\Images\system.img" "C:\VMs\my-vm\converted_disk.vmdk"This reads
system.imgand createsconverted_disk.vmdkinside a dedicated folder for your new VM. The conversion time depends on the image size.
Step 2: Create and Configure the VMware Virtual Machineβ
- Launch VMware Workstation
- From the menu, select
File>New Virtual Machine.... The "New Virtual Machine Wizard" will open. - Select
Custom (advanced)and clickNext. - Hardware Compatibility: Leave the default (
Workstation 16.x) and clickNext. - Guest Operating System Installation: Select
I will install the operating system later.This is critical. ClickNext. - Select a Guest Operating System: Choose the operating system and version that matches your source image (e.g.,
Microsoft WindowsandWindows 10 x64). ClickNext. - Name the Virtual Machine: Provide a name and choose a location (ideally the same folder where you saved your
.vmdk). ClickNext. - Firmware Type: Select
BIOSorUEFI. This must match the source system the image was taken from. If you're unsure, start with BIOS. ClickNext. - Processors and Memory: Allocate CPU cores and RAM for your VM. Click
Next. - Network Type: Choose a network type (e.g.,
Use network address translation (NAT)). ClickNext. - Select I/O Controller Types: Leave the recommended default (e.g.,
LSI Logic SAS). ClickNext. - Select a Disk Type: Leave the recommended default that matches the controller (e.g.,
SCSI). ClickNext. - Select a Disk: This is the most important step. Select
Use an existing virtual disk. ClickNext. - Select an Existing Disk: Click
Browse...and navigate to the.vmdkfile you created in Step 1. ClickNext. - A dialog may ask if you want to convert the disk to a newer format. It is generally safe and recommended to click
Convert. - Ready to Create Virtual Machine: Review the summary and click
Finish.
Step 3: Final Configuration and Bootingβ
- The new VM will appear in your VMware library. Before starting it, you can click
Edit virtual machine settingsto double-check the configuration. - Power on the virtual machine by clicking the green "Power on" arrow. It should now attempt to boot from the converted disk.
Troubleshooting Common Issuesβ
-
"Operating System not found" or "No bootable device was detected" error:
- The Firmware Type does not match the source image. Power off the VM, go to
Edit virtual machine settings>Options>Advanced, and switch fromBIOStoUEFI(or vice-versa). - The original image may not have contained a bootable operating system.
- The bootloader may need repair. You can do this by attaching an installer ISO (
VM>Settings>CD/DVD) and booting into its recovery environment.
- The Firmware Type does not match the source image. Power off the VM, go to
-
Windows VM shows a Blue Screen of Death (BSOD) on boot (e.g.,
INACCESSIBLE_BOOT_DEVICE):- This is almost always a storage driver issue. The virtual hardware's disk controller (e.g.,
LSI Logic SAS) is different from the physical hardware the image was made from. - Solution 1: Power off the VM. Go to
Edit virtual machine settings>Hardware. Remove the existing Hard Disk (choose "Remove," not "Delete from disk"). Then clickAdd...>Hard Disk, select the recommended controller type (SCSIorSATA), and thenUse an existing disk, pointing to your VMDK again. Try a different controller, likeSATA, which is more common. - Solution 2: Boot into a Windows Recovery Environment from an ISO and use command-line tools (like
DISM) to inject the correct VMware storage drivers into the offline OS.
- This is almost always a storage driver issue. The virtual hardware's disk controller (e.g.,